#pragma once

#include <gofcl_timer_r.h>

static inline void timer_wreg_cnt(timer_qe timer_q, u32_s cnt) {
	timer_wreg_u16(timer_q, TIMER_CNT_R, T16B_0_R, cnt);
}

static inline u32_s timer_rreg_cnt(timer_qe timer_q) {
	return timer_rreg_u16(timer_q, TIMER_CNT_R, T16B_0_R);
}

static inline void timer_wreg_psc(timer_qe timer_q, u32_s psc) {
	timer_wreg_u16(timer_q, TIMER_PSC_R, T16B_0_R, psc);
}

static inline void timer_wreg_car(timer_qe timer_q, u32_s car) {
	timer_wreg_u16(timer_q, TIMER_CAR_R, T16B_0_R, car);
}
